const { createProxyMiddleware } = require('http-proxy-middleware')
module.exports = app => {
  // http://localhost:3000/select/list

  app.use('/api', createProxyMiddleware({
    // 目标服务器
    target: 'http://localhost:3000',
    changeOrigin: true,
    pathRewrite: {
      '/api': ''
    }
  }))
}